<script setup>
import { onMounted } from 'vue'
import { useRoute,useRouter } from 'vue-router'
const route = useRoute()
const router = useRouter()
onMounted(() => {
  // 获取当前URL
  const url = new URL(window.location.href)
  
  // 从URL参数中获取token
  const token = route.query.token
    console.log(token)

  // 如果有token，可以存储起来（例如localStorage）
  if (token) {
    localStorage.setItem('token', token)
  }
  
  // 跳转到首页
  router.push('/')
})
</script>

<template>
  <div>login</div>
</template>

<style scoped>
</style>